package net.wanho.convert;

import cn.hutool.core.date.DateUtil;
import org.springframework.core.convert.converter.Converter;

import java.text.SimpleDateFormat;
import java.util.Date;

public class StringToDateConverter implements Converter<String, Date> {
    @Override
    public Date convert(String s) {
        return DateUtil.parse(s, "yyyy-MM-dd HH:mm:ss");
    }
}
